package doipSample;

import org.bdware.doip.endpoint.server.DoipListenerConfig;
import org.bdware.doip.endpoint.server.DoipServer;
import org.bdware.doip.endpoint.server.DoipServerImpl;
import org.bdware.doip.endpoint.server.DoipServiceInfo;

import java.util.ArrayList;

public class DORepository {

    public static void main(String[] args){
        ArrayList<DoipListenerConfig> listenerinfos = new ArrayList<>();
        DoipListenerConfig listener = new DoipListenerConfig("tcp://127.0.0.1:10000","2.1");
        listenerinfos.add(listener);
        DoipServiceInfo serviceInfo = new DoipServiceInfo(
                "test/doip","test/admin","repository",listenerinfos);

        DoipServer server = DoipServerImpl.createDoipServer(serviceInfo);
        server.setRepositoryHandler(new SampleDOIPHandler(serviceInfo));
        server.start();
    }
}
